package com.zpp.module;

import com.google.inject.Binder;
import com.google.inject.Module;
import com.google.inject.Scopes;
import com.zpp.dao.IUserDao;
import com.zpp.dao.impl.UserDaoImpl;

public class BindUserDAOModule implements Module {
  @Override
  public void configure(Binder binder) {
    // 默认绑定是每次都new的，不是单例 单例绑定 Scopes.SINGLETON
    binder.bind(IUserDao.class).to(UserDaoImpl.class).in(Scopes.SINGLETON);
  }
}
